import { request } from '@/utils/request'

/**
 * 发布新闻文章到后端
 * @param data 新闻文章数据
 */
export function publishNewsArticle(data: {
  title: string
  summary: string
  content: string
  cover_image?: string
  tags?: string[]
  meta_title?: string
  meta_description?: string
  meta_keywords?: string
  publish_date?: string
  status: 'published' | 'draft' | 'disabled'
}) {
  // 假设后端接口为 /api/news/
  return request('http://localhost:8000/api/news/', 'POST', data)
}